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ack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/gangwon-parlors/[code]\",\n function () {\n return require(\"private-next-pages/gangwon-parlors/[code]/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/gangwon-parlors/[code]\"])\n });\n }\n ","import { Box, Stack } from \"@mui/material\";\nimport parlors from \"goi_common/src/constants/parlors_detail.json\";\n\nimport {\n ParlorRegionHeadSection,\n BTypeCardView,\n BTypeRegionHead,\n DTypeParlorList,\n FUNERAL_SIDO,\n FUNERAL_SIGUNGU,\n ParlorDetailProps,\n numberToLocalString,\n colors,\n CTypeBreadCrumb,\n BTypeCTA,\n GOI_WEB_URL,\n} from \"goi_common\";\nimport { parlorRegion } from \"@/constants/parlorRegion\";\nimport { GetStaticPaths, GetStaticProps } from \"next\";\nimport Head from \"next/head\";\n\n// Path 로직 안내\n// FUNERAL_SIDO, SIGUNGU의 key로 path 설정.\n//\n// 1. getStaticPaths 내 key,value 받아서 value(key)로 추가한 뒤 params로 넘기게 변경\n// 2. getStaticProps 내 props sido,sigungu, sidoName, sigunguName에 split,replace 로직 추가\n\nconst { regionColor, targetSidos } = parlorRegion;\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const sidoList = Array.from(FUNERAL_SIDO).filter(([key, val]) =>\n targetSidos.includes(String(key))\n );\n\n const sidoPath = sidoList.map(([key, val]) => {\n return {\n params: {\n code: `${val}도 의 장례식장들`,\n },\n };\n });\n\n const sigunguPaths = Array.from(FUNERAL_SIDO)\n .filter(([key, val]) => targetSidos.includes(String(key)))\n .map(([sidoKey, sidoVal]) => {\n const sigungus = FUNERAL_SIGUNGU.get(sidoKey);\n if (sigungus) {\n return Array.from(sigungus).map(([sigunguKey, sigunguVal]) => {\n return {\n params: {\n code: `${sidoVal}도-${sigunguVal} 의 장례식장들`,\n },\n };\n });\n }\n })\n .filter((i) => i != null);\n\n return {\n paths: sidoPath.concat(sigunguPaths?.flat() as Array),\n fallback: false,\n };\n};\n\nfunction getByValue(map: Map, searchValue: any) {\n for (const [key, value] of map.entries()) {\n if (value === searchValue) return key;\n }\n}\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n const code = params?.code as string;\n\n if (code.includes(\"-\")) {\n const [sido, sigungu] = code.split(\"-\");\n const sidoName = sido.replace(\"도\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const sigunguName = sigungu.replace(\" 의 장례식장들\", \"\");\n const sigunguNumber = getByValue(\n FUNERAL_SIGUNGU.get(sidoNumber as number) as any,\n sigunguName\n );\n\n const regionParlors = parlors.filter(\n (p) => String(p.sigungu) === String(sigunguNumber)\n );\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n if (p.binsos.length > 0) {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n }\n });\n\n const description = `${sidoName} ${sigunguName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비용 비교: 강원 내 모든 장례식장에 대한 비용을 알아보세요. 근조화환, 실시간 빈소, 장례식장 위치 등 해당 장례식장에 필요한 정보들을 알아보세요.`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n sigunguName,\n sigungu: sigunguNumber,\n isSigungu: true,\n pageDescription: description,\n pageKeywords: `${sidoName} ${sigunguName} 장례식장, ${sidoName} ${sigunguName} 장례식장 추천, ${sidoName} ${sigunguName} 장례식장 비용, ${sidoName} ${sigunguName} 장례식장 평균 예상 비용, ${sidoName} ${sigunguName} 무빈소, ${sidoName} ${sigunguName} 가족장, ${sidoName} ${sigunguName} `,\n pageOgTitle: `${sidoName} ${sigunguName} 지역의 장례식장 목록, 추천, 안내 :: 강원장례정보공개포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n } else {\n const sidoName = code.replace(\"도 의 장례식장들\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const regionParlors = parlors.filter((p) => p.sido === String(sidoNumber));\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n parlorsString += `${p.companyname} `;\n });\n\n const description = `강원장례정보공개포털 - ${sidoName} 내 ${regionParlors.length}곳의 장례식장 정보, 비용 비교: 빈소 비용 및 추가 비용에 대한 정보. 주변 지역 장례식장 함께 알아보기 ${parlorsString}`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n isSigungu: false,\n pageDescription: description,\n pageKeywords: `${sidoName} 장례식장, ${sidoName} 장례식장 추천, ${sidoName} 장례식장 비용, ${sidoName} 장례식장 평균 예상 비용, ${sidoName} 무빈소, ${sidoName} 가족장, ${sidoName} `,\n pageOgTitle: `${sidoName} 지역 장례식장 추천, 비교, 안내 :: 강원장례정보공개포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n }\n};\n\nexport default function ParlorSlugTypePage({\n regionParlors,\n expectedParlorPrice,\n pageOgTitle,\n sido,\n sidoName,\n sigungu,\n sigunguName,\n isSigungu,\n}: {\n regionParlors: Array;\n expectedParlorPrice: { 무빈소장: number; 가족장: number; 일반장: number };\n pageOgTitle: string;\n sido: string;\n sidoName: string;\n sigungu?: string;\n sigunguName?: string;\n isSigungu: boolean;\n}) {\n const carouselItems = regionParlors.map((res, i) => {\n return {\n \"@type\": \"ListItem\",\n name: `(비용안내) ${res.companyname}`,\n image: `${res.images[0].url}`,\n url: `https://www.gangwon-portal.co.kr/gangwon-parlor/${res.companyname} 정보/`,\n position: i + 1,\n };\n });\n\n const carouselRichSearch =\n regionParlors.length > 6\n ? {\n \"@context\": \"http://schema.org\",\n \"@type\": \"ItemList\",\n itemListElement: carouselItems,\n }\n : {};\n\n if (regionParlors.length === 0) {\n return <>;\n }\n\n return (\n <>\n \n {pageOgTitle}\n {regionParlors.length > 5 && (\n \n )}\n \n\n \n }\n title={\n \n }\n ctaList={[]}\n />\n\n \n \n \n\n \n (\n \n )}\n />\n \n {isSigungu && (\n (\n \n )}\n />\n )}\n \n \n );\n}\n"],"names":["window","__NEXT_P","push","__webpack_require__","regionColor","parlorRegion","ParlorSlugTypePage","param","regionParlors","expectedParlorPrice","pageOgTitle","sido","sidoName","sigungu","sigunguName","isSigungu","carouselItems","map","res","i","name","concat","companyname","image","images","url","position","carouselRichSearch","length","itemListElement","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Fragment","jsxs","Head","title","script","type","dangerouslySetInnerHTML","__html","JSON","stringify","ParlorRegionHeadSection","breadCrumb","CTypeBreadCrumb","firstItem","text","href","GOI_WEB_URL","event","domain","path","trigger_and_target","secondItem","thirdItem","undefined","goiHomeEvent","BTypeRegionHead","mainColor","ctaList","Stack","gap","padding","margin","style","background","boxShadow","BTypeCTA","DTypeParlorList","binsoAveragePrice","CardViewType","BTypeCardView","descriptions","binsos","charge","toLocaleString","imgSrc","Box"],"sourceRoot":""}